<div ng-if="pagedata.op=='get'" class='fui-page fui-page-current' style="background-color:#fff">
	<div class='fui-content'>
		<div class="fe-mod fe-mod-9" style="background-color:#28B5D6;min-height:168px">
			<div class="fe-mod-9-shopname" style="bottom:26px">
				<div class="fe-mod-9-name">{{pagedata.name|| '全网智能平台'}}</div>
			</div>
			<div class="fe-mod-9-shoplogo" style="bottom:60px"> 
				<div class="fe-mod-9-shoplogo-img">
					<img ng-src="{{tomedia(pagedata.ico) || '../core/resource/images/nopic.jpg'}}"/>
				</div>
			</div>
		</div>
		<div class="fui-tab fui-tab-success" ng-if="pagedata.mobile_code">
				<a ng-class="{'disabled':pagedata.item.login_type!=2,'active':pagedata.item.login_type==1}" ng-click="pagedata.item.login_type=1">账号登陆</a>
				<a ng-class="{'disabled':pagedata.item.login_type==2,'active':pagedata.item.login_type==2}" ng-click="pagedata.item.login_type=2">手机登陆</a>
		</div>
		<div class="fui-cell-group" style="margin:0;padding:0 0.5rem">
			<div ng-show="pagedata.item.login_type==1">
                <div class="fui-cell">
                    <div class="fui-cell-icon">
                        <i class="icon icon-wo1"></i>
                    </div>
                    <div class="fui-cell-info">
                        <input type="text" placeholder="请输入账号" class="fui-input" ng-model="pagedata.item.name"/>
                    </div>
                </div>
                <div class="fui-cell" style="border-bottom: 1px solid #ebebeb;">
                    <div class="fui-cell-icon">
                        <i class="icon icon-mima"></i>
                    </div>
                    <div class="fui-cell-info">
                        <input type="password" placeholder="请输入密码" class="fui-input" ng-model="pagedata.item.password" />
                    </div>
                </div>
			</div>
			<div ng-show="pagedata.item.login_type==2">
				<div class="fui-cell must">
					<div class="fui-cell-icon">
                        <i class="icon icon-shumashouji"></i>
                    </div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入您的手机号"  ng-model="pagedata.item.mobile" /></div>
					<div class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" style="padding: 0.1rem 0.5rem;" ng-click="pagedata.send_smscode(pagedata.item.mobile,pagedata.item.code)" id="smscode">获取验证码</a></div>
				</div>
				<div class="fui-cell must ">
					<div class="fui-cell-icon">
                        <i class="icon icon-code"></i>
                    </div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.item.smscode" /></div>
				</div>
			</div>
			<div class="fui-cell must ">
					<div class="fui-cell-icon">
                        <i class="icon icon-pic"></i>
                    </div>
					<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="图片验证码" ng-model="pagedata.item.code" /></div>
					<div class="fui-cell-remark noremark">
						<a class="" href="javascript:;" id="code" ng-click="code_image('imgverify')">
							<img id="imgverify" src="../core/resource/images/no_imgcode.png" style="height:1.6rem;line-height:1.6rem;color:#999;font-size:0.6rem" title="点击更换验证码"/>
						</a>
					</div>
			</div>	
        </div>
		<a ng-init="code_image('imgverify')" id="submit" href='javascript:;' ng-click="post(pagedata.item,'login')" class="weui_btn weui_btn_primary" style="margin:0.5rem">登录</a>
		<a href='javascript:;' ng-if="!pagedata.openlogin" ng-click="post(pagedata.item,'wechat_scan_login')" class="weui_btn weui_btn_plain_primary" style="margin:0.5rem">微信一键登录</a>
		<a href='javascript:;' ng-if="pagedata.openlogin" ng-click="post(pagedata.item,'wechat_login')" class="weui_btn weui_btn_plain_primary" style="margin:0.5rem">微信一键登录</a>
		<div class="form-group other-login-line">
			<div ng-show="pagedata.qq_login" class="other-login-line"><div class="label"> 使用第三方账号登录 </div><div class="line"></div></div>
			<div class="other-login clearfix">
				<div ng-show="pagedata.qq_login" class="login-btn" href='javascript:;' ng-click="post({},'qq_login')"><i class="fa fa-qq"></i></div>
			</div>
			<div class="login-footer">已经有了{{pagedata.name}}账号？<a class="action" href="javascript:;" ng-click="access_json(links('/user.register/'))">去注册</a></div>
		</div>
		<div class="footer-support">
			<div ng-if="main.js_supportimg" class="supportimg"><img ng-src="{{tomedia(main.js_supportimg) || '../core/resource/images/js_supportimg.png'}}"/></div>
			<div class="supporttitle">{{main.js_support}}提供技术支持</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.op=='wxauth_check'" class="fui-page" style="height:auto;background:url('../core/resource/images/login-bg-sm.jpg') no-repeat 100%;background-size: 100%;">
	<div class="fui-content" style="background:none;padding:0.5rem">
		<div class="weui_cells_title" style="font-size:0.9rem;margin-top:2rem;color:#333"><img style="width:1.2rem;height:1.2rem;border-radius:50%" ng-src="{{tomedia(main.icon) || '../core/resource/images/nopic.jpg'}}"> {{main.name}} 申请获取</div>
		<div class="weui_cells_title bold" style="font-size:1rem;margin-top:0.2rem;color:#000">以下信息</div>
		<div class="weui_cells" style="padding-left:10px">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary" style="padding-left:0.2rem">
                    <span>你的账号信息（昵称、头像、地区及性别）</span>
                </div>
            </div>
        </div>
		<div class="weui_cells weui_cells_checkbox" style="padding-left:10px;margin-top:0">
            <label class="weui_cell weui_check_label" for="s11">
                <div class="weui_cell_hd" style="padding-right:0;padding-left:0.2rem;">
                    <img ng-src="{{tomedia(pagedata.fans.avatar) || '../core/resource/images/nopic.jpg'}}" style="width:3rem;height:3rem;border-radius:0.3rem;margin-right:5px;display:block">
                </div>
                <div class="weui_cell_bd weui_cell_primary" style="padding-left:0.2rem">
                    <div style="color:#333;font-size:1rem;padding-bottom:0.3rem">{{pagedata.fans.nickname}}</div>
					<div class="subtitle">微信个人信息</div>
                </div>
				<div class="weui_cell_ft">
                    <input type="radio" class="weui_check" name="checkbox1" id="s11" checked="checked">
                    <span class="weui_icon_checked"></span>
                </div>
            </label>
        </div>
		<button class="weui_btn weui_btn_primary" style="margin: auto;margin-top:8rem;width:60%;" ng-click="access_json('core/user.login/sq_login/session_id='+pagedata.session_id)">授权登录</button>
		<button class="weui_btn weui_btn_disabled weui_btn_default" style="margin: auto;margin-top:0.4rem;width:60%;" ng-click="access_json('core/user.login/sq_login/session_id='+pagedata.session_id)">取消</button>
		<div class="footer-support">
			<div ng-if="main.js_supportimg" class="supportimg"><img ng-src="{{tomedia(main.js_supportimg) || '../core/resource/images/js_supportimg.png'}}"/></div>
			<div class="supporttitle">{{main.js_support}}提供技术支持</div>
		</div>
	</div>
</div>
<script>
scope.pagedata.send_smscode=function(mobile,code){
	if(!mobile){
		alert('请先填写手机号！');
		return false;
	}
	if(scope.pagedata.verify_code && !code){
		alert('请先填写下面的图片验证码！');
		return false;
	}
	if(scope.pagedata.sending){
		return false;
	}
	var params={'data':{'mobile':mobile,'code':code},'op':'send_code'};
	params.callback=function(res){
		if(res=='success'){
			//发送成功，开始倒计时 
			scope.pagedata.sending=true;
			scope.count_down(60,'smscode','秒后重新发送',function(){
				scope.pagedata.sending=false;
				$('#smscode').text('重新发送');
			});
		}else{
			scope.message('验证码发送失败！');
		}
	}
	scope.post_json(params);
}
</script>